<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.8"/>
<title>embedme: libemb/inc/RtcFacade.h 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">embedme
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.8 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li><a href="annotated.html"><span>类</span></a></li>
      <li class="current"><a href="files.html"><span>文件</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>文件列表</span></a></li>
      <li><a href="globals.html"><span>文件成员</span></a></li>
    </ul>
  </div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_574d9269cd334a9d02d8928365303d98.html">libemb</a></li><li class="navelem"><a class="el" href="dir_207aad82934689048a9003fb51f06f7f.html">inc</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">RtcFacade.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_rtc_facade_8h.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/******************************************************************************</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * This file is part of libemb.</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * libemb is free software: you can redistribute it and/or modify</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * it under the terms of the GNU General Public License as published by</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * the Free Software Foundation, either version 3 of the License, or</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> * (at your option) any later version.</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * libemb is distributed in the hope that it will be useful,</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> * GNU General Public License for more details.</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> * You should have received a copy of the GNU General Public License</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> * along with libemb.  If not, see &lt;http://www.gnu.org/licenses/&gt;.</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> * Project: Embedme</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> * Author : FergusZeng</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> * Email  : cblock@126.com</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> * git    : https://git.oschina.net/cblock/embedme</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"> * Copyright 2014 @ ShenZhen ,China</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment">*******************************************************************************/</span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#ifndef __CRTCFACADE_H__</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#define __CRTCFACADE_H__</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_base_type_8h.html">BaseType.h</a>&quot;</span></div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;</div>
<div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="struct_rtc_time___s.html">   31</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct</span></div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;{</div>
<div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="struct_rtc_time___s.html#af7257cc44fa120abdb4b60588565f98b">   33</a></span>&#160;    uint32 <a class="code" href="struct_rtc_time___s.html#af7257cc44fa120abdb4b60588565f98b">m_second</a>;   </div>
<div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="struct_rtc_time___s.html#a98f885de27e4f0f32315d93a5bee214b">   34</a></span>&#160;    uint32 <a class="code" href="struct_rtc_time___s.html#a98f885de27e4f0f32315d93a5bee214b">m_minute</a>;   </div>
<div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="struct_rtc_time___s.html#a46034969a850f92a0953eab1d42bccad">   35</a></span>&#160;    uint32 <a class="code" href="struct_rtc_time___s.html#a46034969a850f92a0953eab1d42bccad">m_hour</a>;     </div>
<div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="struct_rtc_time___s.html#a3be8516909e3507a38f4f264d70e6bc0">   36</a></span>&#160;    uint32 <a class="code" href="struct_rtc_time___s.html#a3be8516909e3507a38f4f264d70e6bc0">m_date</a>;     </div>
<div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="struct_rtc_time___s.html#af0ba52f4f7dbf941aab9891b8ddddf7c">   37</a></span>&#160;    uint32 <a class="code" href="struct_rtc_time___s.html#af0ba52f4f7dbf941aab9891b8ddddf7c">m_month</a>;    </div>
<div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="struct_rtc_time___s.html#a77db796ce6c56d270c51ece59a772edb">   38</a></span>&#160;    uint32 <a class="code" href="struct_rtc_time___s.html#a77db796ce6c56d270c51ece59a772edb">m_year</a>;     </div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;}<a class="code" href="struct_rtc_time___s.html">RtcTime_S</a>;</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;</div>
<div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="class_rtc_facade.html">   46</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_rtc_facade.html">RtcFacade</a>{</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="class_rtc_facade.html#a3f75bba62b8089287367d19cbd530d0b">   54</a></span>&#160;    <span class="keyword">static</span> <a class="code" href="class_rtc_facade.html">RtcFacade</a>* <a class="code" href="class_rtc_facade.html#a3f75bba62b8089287367d19cbd530d0b">getInstance</a>()</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    {</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;        <span class="keyword">static</span> <a class="code" href="class_rtc_facade.html">RtcFacade</a> instance;</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;        <span class="keywordflow">return</span> &amp;instance;</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    }</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;    ~<a class="code" href="class_rtc_facade.html">RtcFacade</a>();</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_rtc_facade.html#a51b015fc835d4907a251067e38da1ebd">showTime</a>(<a class="code" href="struct_rtc_time___s.html">RtcTime_S</a> rtcTime);   <span class="comment">/* 打印RTC时间 */</span></div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    sint32 <a class="code" href="class_rtc_facade.html#a1d53a7fafa86be946cc4b4f6f874d35c">readTime</a>(<a class="code" href="struct_rtc_time___s.html">RtcTime_S</a>&amp; rtcTime);<span class="comment">/* 读取RTC时间 */</span></div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    sint32 <a class="code" href="class_rtc_facade.html#a4cfa3e17936edc43667289d7b8fec099">writeTime</a>(<a class="code" href="struct_rtc_time___s.html">RtcTime_S</a> rtcTime);<span class="comment">/* 改写RTC时间 */</span></div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;    <a class="code" href="class_rtc_facade.html">RtcFacade</a>();</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;};</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="ttc" id="class_rtc_facade_html"><div class="ttname"><a href="class_rtc_facade.html">RtcFacade</a></div><div class="ttdoc">实时时钟设备类 </div><div class="ttdef"><b>Definition:</b> RtcFacade.h:46</div></div>
<div class="ttc" id="struct_rtc_time___s_html_af7257cc44fa120abdb4b60588565f98b"><div class="ttname"><a href="struct_rtc_time___s.html#af7257cc44fa120abdb4b60588565f98b">RtcTime_S::m_second</a></div><div class="ttdeci">uint32 m_second</div><div class="ttdef"><b>Definition:</b> RtcFacade.h:33</div></div>
<div class="ttc" id="struct_rtc_time___s_html_a46034969a850f92a0953eab1d42bccad"><div class="ttname"><a href="struct_rtc_time___s.html#a46034969a850f92a0953eab1d42bccad">RtcTime_S::m_hour</a></div><div class="ttdeci">uint32 m_hour</div><div class="ttdef"><b>Definition:</b> RtcFacade.h:35</div></div>
<div class="ttc" id="struct_rtc_time___s_html_af0ba52f4f7dbf941aab9891b8ddddf7c"><div class="ttname"><a href="struct_rtc_time___s.html#af0ba52f4f7dbf941aab9891b8ddddf7c">RtcTime_S::m_month</a></div><div class="ttdeci">uint32 m_month</div><div class="ttdef"><b>Definition:</b> RtcFacade.h:37</div></div>
<div class="ttc" id="struct_rtc_time___s_html_a3be8516909e3507a38f4f264d70e6bc0"><div class="ttname"><a href="struct_rtc_time___s.html#a3be8516909e3507a38f4f264d70e6bc0">RtcTime_S::m_date</a></div><div class="ttdeci">uint32 m_date</div><div class="ttdef"><b>Definition:</b> RtcFacade.h:36</div></div>
<div class="ttc" id="class_rtc_facade_html_a4cfa3e17936edc43667289d7b8fec099"><div class="ttname"><a href="class_rtc_facade.html#a4cfa3e17936edc43667289d7b8fec099">RtcFacade::writeTime</a></div><div class="ttdeci">sint32 writeTime(RtcTime_S rtcTime)</div><div class="ttdoc">修改实时时间 </div><div class="ttdef"><b>Definition:</b> RtcFacade.cpp:115</div></div>
<div class="ttc" id="class_rtc_facade_html_a51b015fc835d4907a251067e38da1ebd"><div class="ttname"><a href="class_rtc_facade.html#a51b015fc835d4907a251067e38da1ebd">RtcFacade::showTime</a></div><div class="ttdeci">void showTime(RtcTime_S rtcTime)</div><div class="ttdoc">显示实时时间 </div><div class="ttdef"><b>Definition:</b> RtcFacade.cpp:57</div></div>
<div class="ttc" id="struct_rtc_time___s_html_a77db796ce6c56d270c51ece59a772edb"><div class="ttname"><a href="struct_rtc_time___s.html#a77db796ce6c56d270c51ece59a772edb">RtcTime_S::m_year</a></div><div class="ttdeci">uint32 m_year</div><div class="ttdef"><b>Definition:</b> RtcFacade.h:38</div></div>
<div class="ttc" id="struct_rtc_time___s_html"><div class="ttname"><a href="struct_rtc_time___s.html">RtcTime_S</a></div><div class="ttdoc">时间结构体 </div><div class="ttdef"><b>Definition:</b> RtcFacade.h:31</div></div>
<div class="ttc" id="struct_rtc_time___s_html_a98f885de27e4f0f32315d93a5bee214b"><div class="ttname"><a href="struct_rtc_time___s.html#a98f885de27e4f0f32315d93a5bee214b">RtcTime_S::m_minute</a></div><div class="ttdeci">uint32 m_minute</div><div class="ttdef"><b>Definition:</b> RtcFacade.h:34</div></div>
<div class="ttc" id="class_rtc_facade_html_a1d53a7fafa86be946cc4b4f6f874d35c"><div class="ttname"><a href="class_rtc_facade.html#a1d53a7fafa86be946cc4b4f6f874d35c">RtcFacade::readTime</a></div><div class="ttdeci">sint32 readTime(RtcTime_S &amp;rtcTime)</div><div class="ttdoc">获取实时时间 </div><div class="ttdef"><b>Definition:</b> RtcFacade.cpp:71</div></div>
<div class="ttc" id="class_rtc_facade_html_a3f75bba62b8089287367d19cbd530d0b"><div class="ttname"><a href="class_rtc_facade.html#a3f75bba62b8089287367d19cbd530d0b">RtcFacade::getInstance</a></div><div class="ttdeci">static RtcFacade * getInstance()</div><div class="ttdoc">获取RtcFacade单例 </div><div class="ttdef"><b>Definition:</b> RtcFacade.h:54</div></div>
<div class="ttc" id="_base_type_8h_html"><div class="ttname"><a href="_base_type_8h.html">BaseType.h</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
生成于 2016年 七月 7日 星期四 19:49:37 , 为 embedme使用  &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.8
</small></address>
</body>
</html>
